<template>
  <div class="liubei">
    <h1>我是 刘玄德</h1>
    <button @click="attackCaocao">点击攻击曹孟德</button>
  </div>
</template>

<script>
export default {
    methods: {
        attackCaocao(){
            this.$eventBus.$emit("getAttackFromLiubei", ~~(Math.random()*10))
        }
    }
}
</script>

<style>

</style>